﻿<%@ Page Language="C#" MasterPageFile="~/Master.Master" Culture="th-TH" uiCulture="th" AutoEventWireup="true" CodeBehind="PS_Absences.aspx.cs" Inherits="KPIS.GERP.GHRMS.APP.App_UI.Forms.PS_Absences" %>
<%@ Register src="../Controls/DatePickerValidation.ascx" tagname="DatePickerValidation" tagprefix="uc1" %>
<%@ Register src="../Controls/DatePicker.ascx" tagname="DatePicker" tagprefix="uc2" %>
<%@ Register src="../Controls/user.ascx" tagname="user" tagprefix="uc3" %>

<asp:Content ID="Content1" runat="server" 
    contentplaceholderid="ContentPlaceHolder1">
    
    <link href="../../Styles/CssClass.css" rel="stylesheet" type="text/css" />
    <title>บันทึกใบลา</title>
    
    <telerik:RadCodeBlock ID="RadCodeBlock2" runat="server">        
            <script type="text/javascript">
                function CollapseSelectTree() {
                    var treeview = $find('<%= RadTreeView1.ClientID %>');
                    var selectedNode = treeview.get_selectedNode();
                    if (selectedNode != null) {
                        selectedNode.collapse();
                    }
                    else {
                        var firstNode = treeview.findNodeByValue("0");
                        firstNode.collapse();
                    }
                }
                function ExpandSelectTree() {
                    var treeview = $find('<%= RadTreeView1.ClientID %>');
                    var selectedNode = treeview.get_selectedNode();
                    if (selectedNode != null) {
                        selectedNode.expand();
                    }
                    else {
                        var firstNode = treeview.findNodeByValue("0");
                        firstNode.expand();
                    }
                }

                function closeRadWindow(sender, args) {
                    $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest('CloseWindow');
                }

                function onTextChange(sender) {
                    if (sender.get_value() == "") {
                        sender.set_text("");
                    }
                }
                 function AfterChange(sender) 
                 {
                    var date = sender.getSelectedDateFormatted();
                    var all_date = date.split("/");
                    var day = all_date[0];
                    var month = all_date[1];
                    var year = parseInt(all_date[2]) + 543;
                    if (day.length == 1) {
                        day = '0' + day;
                    }
                    if (month.length == 1) {
                        month = '0' + month;
                    }

                    var maskText = $find("<%= txtStartDate.ClientID %>");
                    maskText.SetValue(day + month + year);
                }
                function AfterChange2(sender) 
                 {
                    var date = sender.getSelectedDateFormatted();
                    var all_date = date.split("/");
                    var day = all_date[0];
                    var month = all_date[1];
                    var year = parseInt(all_date[2]) + 543;
                    if (day.length == 1) {
                        day = '0' + day;
                    }
                    if (month.length == 1) {
                        month = '0' + month;
                    }

                    var maskText = $find("<%= txtEndDate.ClientID %>");
                    maskText.SetValue(day + month + year);
                }
                function AfterChange3(sender) 
                 {
                    var date = sender.getSelectedDateFormatted();
                    var all_date = date.split("/");
                    var day = all_date[0];
                    var month = all_date[1];
                    var year = parseInt(all_date[2]) + 543;
                    if (day.length == 1) {
                        day = '0' + day;
                    }
                    if (month.length == 1) {
                        month = '0' + month;
                    }

                    var maskText = $find("<%= txtApprovedDate.ClientID %>");
                    maskText.SetValue(day + month + year);
                }

                var dtCh = "/";
                function validateDate(src, args) {
                    var retVal = false;
                    var txtDate = $find("<%= txtStartDate.ClientID %>");
                    if (txtDate.GetValue().length > 0) {
                        if (isDate(txtDate.get_valueWithLiterals()) == false) {
                            args.IsValid = retVal;
                        }
                    }
                }
            </script>
        
    </telerik:RadCodeBlock>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"  >
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="cmdSearch">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadTreeView1" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="cmdExpand">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadTreeView1" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="cmdCollapse">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadTreeView1" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="RadTreeView1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="PanelCmd" /> 
                    <telerik:AjaxUpdatedControl ControlID="RadTabStrip1" />
                    <telerik:AjaxUpdatedControl ControlID="PanelPageView1" />
                    <telerik:AjaxUpdatedControl ControlID="PanelPageView3" />      
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="btnAddNew">
                <UpdatedControls>                
                    <telerik:AjaxUpdatedControl ControlID="RadTreeView1" />
                    <telerik:AjaxUpdatedControl ControlID="PanelCmd" />                   
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="btnUpdate">
                <UpdatedControls>                
                    <telerik:AjaxUpdatedControl ControlID="RadTreeView1" />
                    <telerik:AjaxUpdatedControl ControlID="PanelCmd" />                  
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="btnCancel">
                <UpdatedControls>                
                    <telerik:AjaxUpdatedControl ControlID="PanelCmd" />                    
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="cmdAddNew">
                <UpdatedControls>                
                    <telerik:AjaxUpdatedControl ControlID="RadTreeView1" />                    
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="cmdDelete">
                <UpdatedControls>               
                     
                    <telerik:AjaxUpdatedControl ControlID="RadTabStrip1" />
                    <telerik:AjaxUpdatedControl ControlID="PanelPageView1" />
                    <telerik:AjaxUpdatedControl ControlID="PanelPageView3" />  
                    <telerik:AjaxUpdatedControl ControlID="PanelTreeView" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="cmdEdit">
                <UpdatedControls>                
                    <telerik:AjaxUpdatedControl ControlID="RadTreeView1" />
                    <telerik:AjaxUpdatedControl ControlID="RadTabStrip1" />
                    <telerik:AjaxUpdatedControl ControlID="PanelPageView1" />
                    <telerik:AjaxUpdatedControl ControlID="PanelPageView3" />                      
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="PanelCmd">
                <UpdatedControls>                                     
                    <telerik:AjaxUpdatedControl ControlID="RadTreeView1" /> 
                    <telerik:AjaxUpdatedControl ControlID="RadTabStrip1" />
                    <telerik:AjaxUpdatedControl ControlID="PanelPageView1" />
                    <telerik:AjaxUpdatedControl ControlID="PanelPageView3" />                   
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" 
        Height="100%" Width="75px" Transparency="50">
        <table style="height: 100%; width: 100%" border="0">
            <tr>
                <td width="100%" align="center" valign="middle">
                    <img alt="Loading..." 
                        src="../Images/Buttons/loading.gif" 
                        style="border: 0px;" />
                </td>
            </tr>
        </table>
    </telerik:RadAjaxLoadingPanel>   

    <table width="1000" cellpadding="0" cellspacing="0">
        <tr>
            <td width="280">
                <div class="moduleDivSlim280">
                <div class="moduleDivBottom280">
                    <table align = "center" width = "250">
                        <tr>
                            <td>
                                สังกัด : 
                            </td>
                            <td>
                                <telerik:RadComboBox runat="server" ID="cmbWorkingJobSite" 
                                    Height="230px" Width="200px" 
                                    AllowCustomText="true" 
                                    Filter = "Contains"
                                    EnableTextSelection = "true"            
                                    ShowDropDownOnTextboxClick="true"
                                    EmptyMessage=".. พิมพ์ที่นี่เพื่อช่วยค้นหา .." 
                                    MarkFirstMatch="false" 
                                    ShowMoreResultsBox="true" 
                                    EnableLoadOnDemand="true" 
                                    EnableVirtualScrolling="true"  
                                    OnClientTextChange="onTextChange" ZIndex="8001" 
                                    OnItemsRequested="cmbWorkingJobSite_ItemsRequested" 
                                    HighlightTemplatedItems = "true"
                                    CausesValidation = "false" AutoPostBack="True" 
                                    onselectedindexchanged="cmbWorkingJobSite_SelectedIndexChanged">
                                    <HeaderTemplate>
                                        <table cellpadding="0" cellspacing="0" width = "200">
                                            <tr>
                                                <td width="300px" align="center"><b>ชื่อหน่วยงาน</b></td>                          
                                            </tr>
                                        </table>
                                    </HeaderTemplate>
                                    <ItemTemplate>
                                        <asp:Table id="tableNewJobsite" runat="server" CellPadding="0" CellSpacing="0">
                                        </asp:Table>
                                    </ItemTemplate>
                                </telerik:RadComboBox>
                            </td>
                        </tr>
                    </table>
                </div>
                </div>
            </td>
            <td width="10" >
            </td>
            <td valign="top" width="700" rowspan="2" >
               <asp:Panel ID="PanelCmd" runat="server" Height="450px" 
                ScrollBars="Auto" Width="700px" 
                BackImageUrl ="~/App_UI/Images/PageView/moduleTop700.gif">
                <table align="center" width = "650px">
                <tr>
                <td class ="tableHeader">
                    <table>
                    <tr>
                    <td width = "100px">
                    <asp:LinkButton ID="cmdAddNew" runat="server" 
                        onclick="cmdAddNew_Click">
                        <img style="border:0px;vertical-align:middle;" alt="" src="../Images/Buttons/AddRecord.gif" />
                        &nbsp;&nbsp;บันทึกใบลา
                    </asp:LinkButton> 
                    </td>
                    <td width = "100px">
                    <asp:LinkButton ID="cmdEdit" runat="server" 
                        onclick="cmdEdit_Click">
                        <img style="border:0px;vertical-align:middle;" alt="" src="../Images/Buttons/Edit.gif" />
                        &nbsp;&nbsp;แก้ไขใบลา
                    </asp:LinkButton>   
                    </td>
                    <td width = "100px">
                     <asp:LinkButton ID="cmdDelete" runat="server" 
                        onclick="cmdDelete_Click">
                        <img style="border:0px;vertical-align:middle;" alt="" src="../Images/Buttons/Delete.gif" />
                        &nbsp;&nbsp;ลบใบลา
                    </asp:LinkButton>
   
                    </td>
                    <td>
                    <asp:Label ID="lblSequence" runat="server" Visible = "false" ></asp:Label>
                    </td>
                    </tr>
                    </table>
                </td>
                </tr>
                <tr>
                <td align ="left">
                <telerik:RadTabStrip 
                    ID="RadTabStrip1" 
                    runat="server" Skin ="Forest" 
                    MultiPageID="RadMultiPage1"
                    SelectedIndex="1">
                    <Tabs>
                        <telerik:RadTab Text="ข้อมูลการลา">
                        </telerik:RadTab>
                        <telerik:RadTab Text="สถิติการลา" Selected="True">
                        </telerik:RadTab>
                        <telerik:RadTab Text="บันทึกการลา">
                        </telerik:RadTab>
                    </Tabs>
            </telerik:RadTabStrip>
            <telerik:RadMultiPage ID="RadMultiPage1" runat="server" SelectedIndex="1" Width="650px">
                <telerik:RadPageView ID="RadPageView1" runat="server" Width = "100%">
                    <asp:Panel ID = "PanelPageView1" runat ="server" 
                          Width ="650px" Height="350px">
                          <br />
                         <table width = "650px">                         
                         <tr >
                            <td class ="tableLine" width = "150px">
                                ชื่อ - นามสกุล : 
                            </td>
                            <td width = "500px" class ="tableLine">
                            <asp:Label ID="lblName" runat="server"></asp:Label></td>
                         </tr>
                         <tr>
                            <td class ="tableLine" width = "150px">
                                ตำแหน่งเลขที่ : 
                            </td>
                            <td class ="tableLine" width = "500px">
                                <asp:Label ID="lblPosRef" runat="server"></asp:Label>                         
                                 - <asp:Label ID="lblPosName" runat="server"></asp:Label>
                            </td>
                         </tr>
                         <tr>
                            <td class ="tableLine" width = "150px">
                                ระดับ :
                            </td>
                            <td class ="tableLine" width = "500px">
                                <asp:Label ID="lblClassName" runat="server"></asp:Label></td>
                         </tr>
                         <tr>
                            <td class ="tableLine" width = "150px">
                                สังกัด : 
                            </td>
                            <td class ="tableLine" width = "500px">
                                <asp:Label ID="lblJobSiteName" runat="server"></asp:Label></td>
                         </tr>
                         <tr>
                            <td class ="tableLine" width = "150px">
                                สังกัดปฏิบัติ :
                            </td>
                            <td class ="tableLine" width = "500px">
                                <asp:Label ID="lblWorkingJobSiteName" runat="server"></asp:Label></td>
                         </tr>
                         <tr>
                         
                            <td class ="tableLine" width = "150px">
                                ขอลา :
                            </td>
                            <td class ="tableLine" width = "500px">
                                <asp:Label ID="lblAbsenceType" runat="server" ></asp:Label>
                            </td>
                         </tr>
                         <tr>
                            <td class ="tableLine" width = "150px">
                                เนื่องจาก :
                            </td>
                            <td class ="tableLine" width = "500px">
                                <asp:Label ID="lblReason" runat="server" ></asp:Label>
                            </td>
                         </tr>
                         <tr>
                            <td class ="tableLine" width = "150px">
                                ตั้งแต่วันที่ :
                            </td>
                            <td class ="tableLine" width = "500px">
                                <asp:Label ID="lblStartDate" runat="server" ></asp:Label>
                                ถึงวันที่ : 
                                <asp:Label ID="lblEndDate" runat="server" ></asp:Label>
                                รวม : 
                                <asp:Label ID="lblCountDate" runat="server" ></asp:Label> 
                                วัน
                            </td>
                          </tr>
<%--                            <li>ได้ลา : <asp:Label ID="lblLastAbsence" runat="server"></asp:Label></li>
                            <li>ครั้งสุดท้ายเมื่อวันที่ : <asp:Label ID="lblLastStartDate" runat="server"></asp:Label></li>
                            <li>ถึงวันที่ : <asp:Label ID="lblLastEndDate" runat="server"></asp:Label></li>
                            <li>มีกำหนด : <asp:Label ID="lblLastCountDate" runat="server"></asp:Label> วัน</li>--%>
                          <tr>
                            <td class ="tableLine" width = "150px">
                                ที่อยู่ติดต่อระหว่างลา :
                            </td>
                            <td class ="tableLine" width = "500px">                                 
                                <asp:Label ID="lblContactAddress" runat="server"></asp:Label>
                            </td>
                          </tr>
                          </table>
                    </asp:Panel>
                </telerik:RadPageView>               
                
                <telerik:RadPageView ID="RadPageView2" runat="server" Width = "100%">
                    <ul>
                        <li><label>อยู่ระหว่างดำเนินการ</label></li>
                    </ul>
                </telerik:RadPageView>
                <telerik:RadPageView ID="RadPageView3" runat="server" Width = "100%">
                    <asp:Panel ID = "PanelPageView3" runat ="server" 
                         Width ="650px" Height="390px">
                    <br />
                    <table Width ="650px">                   
                    <tr>
                    <td class ="tableLine" Width ="150px">ชื่อ - นามสกุล : </td>
                    <td class ="tableLine" Width ="500px">
                        <telerik:RadComboBox runat="server" ID="cmbEmployee" 
                            Height="230px" Width="500px" 
                            AllowCustomText="true" 
                            Filter = "Contains"
                            EnableTextSelection = "true"            
                            ShowDropDownOnTextboxClick="true"
                            EmptyMessage=".. พิมพ์ที่นี่เพื่อช่วยค้นหา .." 
                            HighlightTemplatedItems = "true"
                            MarkFirstMatch="false" 
                            ShowMoreResultsBox="true" 
                            EnableLoadOnDemand="true" 
                            EnableVirtualScrolling="true"  
                            OnClientTextChange="onTextChange" ZIndex="8001" 
                            CausesValidation = "false" 
                            onitemsrequested="cmbEmployee_ItemsRequested" AutoPostBack="True" 
                            onselectedindexchanged="cmbEmployee_SelectedIndexChanged">
                            <HeaderTemplate>
                                <table cellpadding="0" cellspacing="0" width = "350">
                                    <tr>
                                        <td width="150px" align="center"><b>ชื่อ - นามสกุล</b></td>
                                        <td width="100px" align="center"><b>ตำแหน่ง</b></td>
                                        <td width="100px" align="center"><b>ระดับ</b></td>                                                    
                                    </tr>
                                </table>
                            </HeaderTemplate>
                            <ItemTemplate>
                                <asp:Table id="tableEmployee" runat="server" CellPadding="0" CellSpacing="0">
                                </asp:Table>
                            </ItemTemplate>
                        </telerik:RadComboBox>
                      </td>
                      </tr>
                      <tr>
                      <td class ="tableLine" Width ="150px">ขอลา : </td>
                      <td class ="tableLine" Width ="500px">
                        <telerik:RadComboBox 
                            ID="cmbAbsenceType" 
                            DataTextField = "Name"
                            DataValueField = "Sequence"
                            runat="server" 
                            AllowCustomText="true" 
                            CausesValidation="false" 
                            EmptyMessage="... เลือกประเภทการลา ..."                                                                     
                            Filter="Contains" 
                            OnClientTextChange ="onTextChange"
                            Width="200px">
                        </telerik:RadComboBox>
                       </td>
                       </tr>
                       <tr>
                       <td class ="tableLine" Width ="150px">เนื่องจาก : </td>
                       <td class ="tableLine" Width ="500px">
                            <telerik:RadTextBox 
                                 ID="txtReason" 
                                Runat="server" 
                                Skin="Outlook"                                 
                                TabIndex="1"                 
                                Width="300px" >
                            </telerik:RadTextBox>
                        </td>
                        </tr>
                        <tr>
                        <td class ="tableLine" Width ="150px" valign ="top">ตั้งแต่วันที่ : </td>
                        <td class ="tableLine" Width ="500px">
                              <uc2:DatePicker ID="txtStartDate" runat="server" />
                              <asp:RadioButtonList ID="rdoStartTime" runat="server" 
                                RepeatDirection="Horizontal">
                                <asp:ListItem Selected="True" Value="M">เช้า</asp:ListItem>
                                <asp:ListItem Value="A">บ่าย</asp:ListItem>
                            </asp:RadioButtonList>
                        </td>
                        </tr>
                        <tr>
                        <td class ="tableLine" Width ="150px" valign ="top">ถึงวันที่ : </td>
                        <td class ="tableLine" Width ="500px">
                            <uc2:DatePicker ID="txtEndDate" runat="server" />
                            <asp:RadioButtonList ID="rdoEndTime" runat="server" 
                                RepeatDirection="Horizontal">
                                <asp:ListItem Selected="True" Value="M">เช้า</asp:ListItem>
                                <asp:ListItem Value="A">บ่าย</asp:ListItem>
                            </asp:RadioButtonList>
                        </td>
                        </tr>
                        <tr>
                        <td class ="tableLine" Width ="150px">มีกำหนด : </td>
                        <td class ="tableLine" Width ="500px" >
                            <telerik:RadTextBox 
                                ID="txtCountDate" 
                                Runat="server" 
                                Skin="Outlook" 
                                TabIndex="1"                 
                                Width="100px" >
                            </telerik:RadTextBox> วัน
                        </td>
                        </tr>
                        <tr>
                        <td class ="tableLine" Width ="150px" valign ="top"> ที่อยู่ติดต่อระหว่างลา : </td>
                        <td class ="tableLine" Width ="500px">
                            <telerik:RadTextBox 
                                ID="txtContactAddress" 
                                MaxLength = "255"
                                Runat="server" 
                                Skin="Outlook" 
                                TabIndex="1"  
                                TextMode ="MultiLine"
                                Rows = "3"               
                                Width="300px" >
                            </telerik:RadTextBox>
                        </td>
                        </tr>
                        <tr>
                        <td class ="tableLine" Width ="150px">สถานะ : </td>
                        <td class ="tableLine" Width ="500px" >
                             <telerik:RadComboBox
                                runat="server" ID="cmbStatus"
                                AutoPostBack="true"
                                EmptyMessage = "...สถานะใบลา..."
                                Width="200px">
                            <Items>
                                <telerik:RadComboBoxItem Text="อยู่ระหว่างการพิจารณา" Value="W" Selected="true"></telerik:RadComboBoxItem>
                                <telerik:RadComboBoxItem Text="อนุมัติ" Value="A"></telerik:RadComboBoxItem>
                                <telerik:RadComboBoxItem Text="ไม่อนุมัติ" Value="E"></telerik:RadComboBoxItem>
                                <telerik:RadComboBoxItem Text="ยกเลิก" Value="C"></telerik:RadComboBoxItem>
                            </Items>
                            </telerik:RadComboBox>
                        </td>
                        </tr>
                        <tr>
                        <td class ="tableLine" Width ="150px">ผู้อนุมัติ : </td>
                        <td class ="tableLine" Width ="500px" >
                            <telerik:RadComboBox ID="cmbApprovedBy" runat="server" 
                                Height="200px" Width="200px"
                                DropDownWidth="450px" 
                                LoadingMessage = "โหลดข้อมูล"
                                EmptyMessage="...เลือกผู้บังคับบัญชา..." 
                                HighlightTemplatedItems="true"
                                EnableLoadOnDemand="true" 
                                EnableTextSelection = "true"
                                onitemsrequested="cmbApprovedBy_ItemsRequested">
                            <HeaderTemplate>
                                <table style="width: 450px" cellspacing="0" cellpadding="0">
                                    <tr>
                                        <td style="width: 150px;">
                                            ชื่อ - สกุล</td>
                                        <td style="width: 150px;">
                                            ตำแหน่ง</td>
                                        <td style="width: 150px;">
                                            ระดับ</td>
                                    </tr>
                                </table>
                            </HeaderTemplate>
                            <ItemTemplate>
                                <table style="width: 450px" cellspacing="0" cellpadding="0">
                                    <tr>
                                        <td style="width: 150px;">
                                            <%# DataBinder.Eval(Container, "Attributes['FULL_NAME']")%>
                                        </td>
                                        <td style="width: 150px;">
                                            <%# DataBinder.Eval(Container, "Attributes['EXEC_POS_NAME']")%>
                                        </td>
                                        <td style="width: 150px;">
                                            <%# DataBinder.Eval(Container, "Attributes['CLASS_NAME']")%>
                                        </td>
                                    </tr>
                                </table>
                            </ItemTemplate>
                        </telerik:RadComboBox>
                        </td>
                        </tr>
                        <tr>
                        <td class ="tableLine" Width ="150px">ตำแหน่ง : </td>
                        <td class ="tableLine" Width ="500px" >
                            <telerik:RadTextBox 
                                ID="txtApprovedPosition"
                                Runat="server" 
                                Skin="Outlook" 
                                TabIndex="1"                 
                                Width="300px" >
                            </telerik:RadTextBox>
                        </td>
                        </tr>
                        </tr>
                        </tr>
                        </tr>
                        </tr>
                        </tr>
                        </tr>
                        </tr>
                        </tr>
                        </tr>
                        </tr>
                        </tr>
                        </tr>
                        </tr>
                        </tr>
                        <td class ="tableLine" Width ="150px" valign ="top">วันที่อนุมัติ : </td>
                        <td class ="tableLine" Width ="500px">
                            <uc2:DatePicker ID="txtApprovedDate" runat="server" />    
                        </td>
                        </tr>
                        <td class="tableLine" Width="150px">
                        </td>
                        <td class="tableLine" width="500px">
                            <asp:Button ID="btnAddnew" runat="server" CommandName="Update" 
                                onclick="btnAddnew_Click" text="บันทึก" />
                            <asp:Button ID="btnUpdate" runat="server" CommandName="Update" 
                                onclick="btnUpdate_Click" text="แก้ไข" />
                            &nbsp;<asp:Button ID="btnCancel" runat="server" causesvalidation="False" 
                                commandname="Cancel" onclick="btnCancel_Click" text="ยกเลิก" />
                        </td>
                        </table>
                    </asp:Panel>
                </telerik:RadPageView>                
            </telerik:RadMultiPage>
            </td>
            </tr>
            </table>
            </asp:Panel>
            </td>
        </tr>
        <tr>
            <td width="400" valign="top">
                <div class="moduleDivSlim280">
                    <div class="moduleDivBottom280">
                        <asp:Panel ID="Panel1" runat="server" Width="280px" ScrollBars="Auto">
                        <table >
                                <tr>
                                    <td class ="tableHeader" >
                                        &nbsp;&nbsp; ค้นหา :&nbsp;
                                        <telerik:RadTextBox ID="txtSearch" Runat="server">
                                        </telerik:RadTextBox>
                                        <asp:ImageButton ID="cmdSearch" runat="server" onclick="cmdSearch_Click" 
                                            ToolTip="กดปุ่มเพื่อเริ่มค้นหาข้อมูล" 
                                            ImageUrl="~/App_UI/Images/Buttons/Magnifier.gif" />
                                        &nbsp;
                                        <asp:ImageButton ID="cmdExpand" runat="server" 
                                            ImageUrl="../Images/Buttons/ExpandAll.gif" onclick="cmdExpand_Click" 
                                            ToolTip="ขยายทั้งหมด" Height="20px" style="width: 18px" />
                                        &nbsp;
                                        <asp:ImageButton ID="cmdCollapse" runat="server" 
                                            ImageUrl="../Images/Buttons/CollapseAll.gif" onclick="cmdCollapse_Click" 
                                            ToolTip="ย่อทั้งหมด" Height="20px" />
                                    </td>
                                </tr>
                            </table>
                            
                        </asp:Panel>
                        <asp:Panel ID="PanelTreeView" runat="server" Width="280px" Height="350px" ScrollBars="Auto">
                            <telerik:RadTreeView Runat="server" 
                                ID="RadTreeView1" 
                                DataFieldID="Id" 
                                DataFieldParentID="Parent_id" 
                                DataTextField="Name" 
                                DataValueField="Id" 
                                EnableDragAndDrop="True"
                                onnodeclick="RadTreeView1_NodeClick" 
                                CausesValidation="False" 
                                onnodeexpand="RadTreeView1_NodeExpand">
                            </telerik:RadTreeView>
                        </asp:Panel>
                    </div>
                </div>
            </td>
            <td width="10">
            </td>
        </tr>
        
    </table>
    </asp:Content>